<template>
  <el-descriptions ref="ruleFormRef" :column="2" direction="vertical" v-loading="isLoading">

		<!-- <el-descriptions-item width="50%" :label='titles.id'>
			{{ isNullOrEmpty( formInline?.id ) }}
		</el-descriptions-item>
		<el-descriptions-item width="50%" :label='titles.projectId'>
			{{ isNullOrEmpty( formInline?.projectId ) }}
		</el-descriptions-item> -->
		<el-descriptions-item width="50%" :label='titles.projectName'>
			{{ isNullOrEmpty( operate?.projectName ) }}
		</el-descriptions-item>
		<el-descriptions-item width="50%" :label='titles.groupName'>
			{{ isNullOrEmpty( formInline?.groupName ) }}
		</el-descriptions-item>
		<el-descriptions-item width="50%" :label='titles.mainteUid'>
			{{ isNullOrEmpty( formInline?.mainteName ) }}
		</el-descriptions-item>
		<el-descriptions-item width="50%" :label='titles.scrapUid'>
			{{ isNullOrEmpty( formInline?.scrapName ) }}
		</el-descriptions-item>
		<el-descriptions-item width="50%" :label='titles.expireUid'>
			{{ isNullOrEmpty( formInline?.expireName ) }}
		</el-descriptions-item>
		<el-descriptions-item width="50%" :label='titles.noticeMode'>
			
				<el-text v-for="(row,index) in formInline.noticeMode" :key="index">
					&#8197;{{ isNullOrEmpty(NOTIFICATIONTYPE[row]) }}
			</el-text>
			
			
			
		</el-descriptions-item>  </el-descriptions>
</template>

<script setup lang="ts">
import { isNullOrEmpty } from '@/utils/functions'
import { ref } from "vue";
import { titles } from './index';
import type { infoType } from '@/api//operate/project-management/project-management/facility-grouping/index';
import { usePageVariablesStoreHook,  } from '@/store/modules/pageVariables'
import {NOTIFICATIONTYPE} from "@/constant/alarm-mangenment"
const operate = usePageVariablesStoreHook().getOperate()
console.log("operate",operate);

type FormProps = {
	formInline: infoType,
	isLoading: boolean
}

const props = withDefaults(defineProps<FormProps>(), {
	formInline: () => ({} as infoType),
	isLoading: false
});

const ruleFormRef = ref();
//  const newFormInline = ref(props.formInline as any);
//
//
//  watch(()=>props.formInline,()=>{
//  	newFormInline.value = props.formInline
//  },{
//  	deep:true,
//  	immediate:true
//  })

function getRef() {
	return ruleFormRef.value;
}

defineExpose({ getRef });
</script>
